package com.app.sgd.mail;

import java.util.PropertyResourceBundle;
import java.util.ResourceBundle;

import javax.mail.Authenticator;
import javax.mail.PasswordAuthentication;

public class MyAuthenticator extends Authenticator {
	ResourceBundle res = PropertyResourceBundle.getBundle("com.app.sgd.resources.parameters");
	String username = "";
	String password = "";

	public MyAuthenticator() {
		username = (String)res.getObject("usernameCorreo");
		password = (String)res.getObject("passwordCorreo");
	}

	public PasswordAuthentication getPasswordAuthentication() {
		return new PasswordAuthentication(username, password);
	}
}
